﻿@model IEnumerable<Sohobloo.SoAuth.Web.Models.RoleModel>

<h2>Role</h2>
@Html.ActionLink("Back", "Index", "Home")
@Html.ActionLink("Create", "Add")
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(r => r.RoleName)
        </th>
        <th>
            @Html.DisplayNameFor(r => r.RoleDescription)
        </th>
        <th>
            @Html.DisplayNameFor(r =>r.RoleEnabled)
        </th>
        <th>
        </th>
    </tr>
    @foreach (var role in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(m => role.RoleName)
            </td>
            <td>
                @Html.DisplayFor(m => role.RoleDescription)
            </td>
            <td>
                @Html.DisplayFor(m => role.RoleEnabled)
            </td>
            <td>
                @Html.ActionLink("Permissions", "Index", "Permission", new {role.Id}, null)
                @Html.ActionLink("Users", "Index", "RoleUser", new {role.Id}, null)
                @Html.ActionLink("Edit", "Edit", new {role.Id})
                @Html.ActionLink("Delete", "Delete", new {role.Id})
            </td>
        </tr>
    }
</table>